<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>组件的内容</title>
  <script type="text/javascript" src="vue.js"></script>
</head>
<body>
  <div id="app">
    <greeting to="Mike">Happy new year</greeting>
    <greeting to="Jane">Happy birthday</greeting>
  </div>
  
  <script>
    Vue.component('greeting', {
      props:['to'],
      template: '<h1><slot></slot> {{to}}!</h1>'
    })

    let vm = new Vue({
      el: "#app"
    })
  </script>
</body>
</html>